{extend name="public/base"} 
{block name="title"}书籍分享话术{/block}
{block name="body"}
<div class="layui-fluid">
	<div class="layui-row">
		<div class="layui-card">
			<div class="layui-card-header">
				分享话术明细
			</div>
			<div class="layui-card-body">
				<div class="layui-form">
					
					<div class="layui-form-item">
						<div class="layui-block">
							<div class="text-line">
								{$cur.title}
							</div>
							<hr />
							<a href="javascript:;" class="layui-btn layui-btn-primary layui-btn-xs copy" data-clipboard-action="copy" data-clipboard-text="{$cur.title}">复制</a>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-block">
							<div class="text-line">
								{$cur.content}
							</div>
							<hr />
							<a href="javascript:;" class="layui-btn layui-btn-primary layui-btn-xs copy" data-clipboard-action="copy" data-clipboard-text="{$cur.content}">复制</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="footJs"}
<script type="text/javascript" src="/static/common/js/clipboard.min.js"></script>
<script type="text/javascript">
layui.use(['jquery','layer'], function(){
	  var $ = layui.jquery,
	  layer = layui.layer;
	var clipboard = new Clipboard('.copy');
	clipboard.on('success', function (e) {
		layer.msg("复制成功!",{icon:1,offset:'200px'});
		e.clearSelection();
	});
	clipboard.on('error', function (e) {
		console.error('Action:', e.action);
		console.error('Trigger:', e.trigger);
	});
});
</script>
{/block}
